<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="aa" uri="http://ajaxanywhere.sourceforge.net/"%>
<%--<%@ taglib tagdir="/WEB-INF/tags" prefix="app"%>--%>
<!doctype html>
<html lang="zh-CN">
<head>
	<meta charset="utf-8">
	<meta name="viewport"
		  content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<title>jsp</title>
	<script src="/webjars/jquery/3.5.1/jquery.js"></script>
	<script src="/aa.js"></script>
	<link rel="stylesheet" href="/resources/css/bootstrap.min.css" />
	<link rel="stylesheet" href="/resources/css/dashboard.css" />
	<title>添加数据</title>
</head>
<body>
<div class="container">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<h5 class="modal-title" id="exampleModalLabel">添加数据</h5>
				<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
			</div>
			<div class="modal-body">
				<div class="mb-3">
					<label  class="form-label">ID</label>
					<input type="text" class="form-control"  name="id" id="id">
				</div>
				<div class="mb-3">
					<label  class="form-label">NAME</label>
					<input type="text" class="form-control"  name="name"  id="name">
				</div>
				<div class="mb-3">
					<label  class="form-label">ADDRESS</label>
					<input type="text" class="form-control"  name="address"  id="address">
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" id="close">Close</button>
				<button type="button" class="btn btn-primary" id="saveDialog">保存</button>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
	$('#saveDialog').click(function() {
		if(window.parent && window.parent.opener){
			window.parent.opener['${id}SaveDialog']({
				id: $('#id').val(),
				name: $('#name').val(),
				address: $('#address').val()
			});
		}
		window.close()
	});

	$('#close').click(function() {
		window.close()
	});


</script>
<script src="/resources/js/http.js"></script>
<script src="/resources/js/vue.global.prod.js"></script>
<script src="/resources/js/bootstrap.bundle.min.js"></script>
<script src="/resources/js/feather.min.js"></script>
</body>
</html>